= simple_form_for @project, html: { class: 'project-form w-form' } do |form|
  .w-section.section
    .w-container
      .w-row
        .w-col.w-col-10.w-col-push-1
          .w-form
              = @project.display_errors(:basics)
              - if (current_user && current_user.admin?)
                = form.input :user_id, as: :string, 
                  wrapper: :two_columns,
                  wrapper_class: 'w-row u-marginbottom-20 card card-terciary medium',
                  label_wrapper_html: { class: 'w-col w-col-5' },
                  text_field_wrapper_html: { class: 'w-col w-col-7' },
                  input_html: { class: 'positive medium', required: true },
                  validation_text: false

              = form.input :name, as: :string, 
                wrapper: :two_columns,
                wrapper_class: 'w-row u-marginbottom-30 card card-terciary medium',
                label_wrapper_html: { class: 'w-col w-col-5 w-subcol' },
                text_field_wrapper_html: { class: 'w-col w-col-7 w-sub-col' },
                input_html: { class: 'positive medium', required: true },
                validation_text: false

              = form.input :permalink, as: :string, 
                wrapper: :two_columns_with_postfix,
                wrapper_class: 'w-row u-marginbottom-30 card card-terciary medium',
                label_wrapper_html: { class: 'w-col w-col-5 w-subcol' },
                text_field_wrapper_html: { class: 'w-col w-col-7 w-sub-col' },
                input_html: { class: 'postfix positive medium', required: true },
                field_wrapper_html: { class: 'w-col w-col-8 w-col-small-6 w-col-tiny-6' },
                validation_text: false,
                preppend_text_wrapper_html: { class: 'w-col w-col-4 w-col-small-6 w-col-tiny-6 text-field prefix no-hover medium prefix-permalink' },
                preppend_input_text: 'www.catarse.me/',
                preppend_input_text_wrapper_html: { class: 'fontcolor-secondary u-text-center fontsize-smallest' }

              = form.association :category, as: :select, 
                collection: Category.order(:name_pt),
                prompt: t('simple_form.prompts.project.category'),
                wrapper: :two_columns,
                wrapper_class: 'w-row u-marginbottom-30 card card-terciary medium',
                label_wrapper_html: { class: 'w-col w-col-5 w-subcol' },
                text_field_wrapper_html: { class: 'w-col w-col-7' },
                input_html: { class: 'w-select text-field positive medium', required: true },
                validation_text: false

    .section
      .w-container
        .w-row
          .w-col.w-col-4.w-col-push-4
            = hidden_field_tag 'anchor', 'basics'
            = form.button :submit, t('.form.submit'), class:'btn btn-large', id: 'basics-save'
